<%@page import="dao.UserData"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Thêm Item</title>

</head>
<%
	String err = "";
	if (request.getAttribute("err") != null) {
		err = (String) request.getAttribute("err");
	}
	String sesItem = (String) session.getAttribute("email");
	if(sesItem==null){
		response.sendRedirect("index.jsp");
	}
	int level = UserData.getLevel(sesItem, "accountManager");
	if(level!=1){
		response.sendRedirect("index.jsp");
	}
%>
<body>
	<form enctype = "multipart/form-data" action="AddItem" method="post">
		<table>
			<tr>
				<td>Tên vật phẩm :</td>
				<td><input type="text" name="nameItem"><span
					style="color: red;">*<%=err%></span></td>
			</tr>
			<tr>
				<td>Giá vật phẩm :</td>
				<td><input type="text" name="priceItem"></td>
			</tr>
			<tr>
				<td>Hình ảnh:</td>
				<td><input type="file" name="avatarItem"></td>
			</tr>
			<tr>
				<td><input type="submit" value="Thêm"></td>
				<td></td>
			</tr>
		</table>

	</form>
</body>
</html>